//
//  AppUtility.h
//  iOSToolkit-OC
//
//  Created by Evan Xie on 8/3/15.
//  Copyright (c) 2015 Family Wings. All rights reserved.
//

#import <Foundation/Foundation.h>


typedef void (^AppCommonBlock) (void); // A quick declaration block for your common use.
typedef void (^AppCommonCompletionBlock)(NSError *error); // A quick declaration block as a callback to let you know whether your task succeeds or fails with an error.
typedef void (^AppCommonFailureBlock) (NSError *error); // A quick declaration block as a callback to let you know your task interrupted with an error.
typedef void (^AppCommonSuccessBlock) (void); // A quick declaration block as a callback to let you know your task finishes successfully.
typedef void (^AppCommonResultBlock)(id result, NSError *error); // A quick declaration block as a callback to let you get the result object.


@interface AppUtility : NSObject

+ (void)postNotificationOnMainThread:(NSString *)notificationName object:(id)object userInfo:(NSDictionary *)userInfo;

+ (void)runBlockOnMainThread:(void (^)(void))block;

@end
